package com.demo.service.impl;

import com.demo.dto.SysUserDTO;
import com.demo.dto.UserDTO;
import com.demo.entity.SysUser;
import com.demo.entity.User;
import com.demo.mapper.SysUserMapper;
import com.demo.mapper.UserMapper;
import com.demo.service.SysUserService;
import com.demo.service.UserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;


    @Override
    public List<User> findAllUsers() {
        return mapper.findAllUsers();
    }

    @Override
    public int updateUserState(String disabled, int userId) {
        return mapper.updateUserState(disabled, userId);
    }

    @Override
    public int resetUser(int userId) {
        return mapper.resetUser(userId);
    }

    @Override
    public int deleteUser(int userId) {
        return mapper.deleteUser(userId);
    }
}